<?php


/* 
 
 * To change this license header, choose License Headers in Project Properties.
 * To change this template file, choose Tools | Templates
 * and open the template in the editor.
 */

require './api.class.php';



 
getStock();
//minus();
plus();
function getStock() {

    $api = new api();
    $api->adddata("sku", "P0041417,P0041423");
    $api->adddata("method", "Stock.query");
    $res = $api->send();
    echo '<pre>';
    var_dump($res);
}

function minus() {
    
    $data=array('P004ssss1417'=>123,'P0sss041z423'=>11);
    $api = new api();
    $api->adddata("data", json_encode($data));
    $api->adddata("order_id", "2013313sss13");
    $api->adddata("method", "Stock.minus");
    $res = $api->send();
    echo '<pre>';
    var_dump($res);
}
function plus() {
    $data=array('P00asdasd41417'=>123,'P0041sadsa423'=>11);
    $api = new api();
    $api->adddata("data", json_encode($data));
    $api->adddata("order_id", "20133sadsa13s13");
    $api->adddata("method", "Stock.plus");
    $res = $api->send();
    echo '<pre>';
    var_dump($res);
}

